/*************************************************************************
 *                                                                       *
 * This file is part of the FreeMAPs distribution.  For full copyright   *
 * information, see COPYRIGHT and COPYING.LESSER.                        *
 *                                                                       *
 * Author:           sqbang                                              *
 * Email:            sqbang@ustc.edu                                     *
 * Date:             2011.03.30                                          *
 *                                                                       *
 *************************************************************************/

//declaration header
#include "COMMON/base/Common.h"

//C++ headers
#include <iostream>

//#include "gDASim/KonsoleUtil.h"

namespace FreeMAPs
{

void
FREEMAPS_CHKERR(
    const int ierr)
{
    (void)ierr;
}



int
Utilities::abort(
    const std::string& message,
    const std::string& file_name,
    const int line)
{
    std::stringstream ss;
    ss << "in file \"" << file_name << "\" in line " << line << '\n'  << message << std::endl;
    std::string str = ss.str();
    //\u0000\n
    str.pop_back();// remove \n
    str.pop_back();//remove \u0000

    //std::cout << __FILE__ << __LINE__ << "--str--" << str << " lenght = " << str.length() << std::endl;
    //const QString& konsole_message = QString::fromStdString(str);

    //LINXIA::KonsoleUtil::log(konsole_message);
    return 1;
}

} //namespace FreeMAPs
